

class AIManager:

    def __init__(self, map):
        self.map = map

    def EstimateAttack():
        return (0.5 + random.random()) * ( infrantry.size * Infrantry.attack + tank.size * Tank.attack + plane.size * Plane.attack)

    def EstimateDefense():
        return (0.5 + random.random()) * ( infrantry.size * Infrantry.defense + tank.size * Tank.defense + plane.size * Plane.defense)

    def EstimateLosses(attacker, defender):
        return (0.5 + random.random()) * EstimateAttack(attacker)/EstimateDefense(defender)

    def EstimateOutput():
        return EstimateLosses(me, enemy)/EstimateLosses(enemy, me)




    def doMove(self):
        findUnits()

    def findUnits(self):
        for x in range(0, map.size):
            for y in range(0, map.size):
                if map.HasUnits(x,y):
                    if map.IsAI(x,y):
                        self.myUnits.append([x,y])
                    else:
                        self.enemyUnits.append([x,y])
